#include <iostream>
#include <string>

using namespace std;

int main() {
    string line;
    getline(cin, line);
    int n = line.size();
    string str = "";
    string sec;
    int tot = 0;
    for (int i = 0; i < n; i++) {
        if (line[i] == ' ') {
            if (tot == 1)
                sec = str;
            else
                cout << str << " ";
            str = "";
            tot++;
        } else {
            str += line[i];
        }
    }
    if (str != "") cout << str;
    for (int i = 0; i < sec.size(); i++) {
        // turn upper
        if (sec[i] >= 'a' && sec[i] <= 'z') {
            sec[i] = sec[i] - 'a' + 'A';
        }
    }
    cout << " " << sec;
}